#include <iostream>
#include <cstring>
#include <conio.h>
using namespace std;


long long Fpow(long long x){
	long long a=2;
	long long result = 1;
	while(x){
		if(x&1){
			result = result*a;
		}
		x = x>>1;
		a = a*a;
	}
	return result;
}


int main(){
	FILE *fin,*fout;
	try{
		fin = fopen("D:\\number2 game\\score.data","r");
		int score;
		fscanf(fin,"%lld",&score);
		printf("your highest score in the pass:%lld",Fpow(score));
		score = max(score,game());
		fclose(fin);
		fout = fopen("D:\\number2 game\\score.data","w");
		fprintf(fout,"%lld",score);
		fclose(fout);
	}
	catch(){
		printf("Hello!Welcome to play number2 game.There are some tips for you playing:\n");
		printf("1.Use \"wasd\" to let the block move\n");
		printf("2.When you die,pleace use \"r\" to start-up again\n");
		printf("3.When you want to quit the game,pleace enter \"q\" to exit this game");
		printf("4.You can check your score on the right of the screen\n");
		printf("5.If you forget these tips,you can enter \"h\" to check the \"help\"\n");
		printf("Thanks for you watching.Have a great time!");
	}
	return 0;
}
